package top.z.orm.handle.util;

import java.util.List;
import java.util.Map;
import java.util.Set;

public class ObjectUtils {

    public static <T> boolean isEmpty(final List<T> list) {
        return list == null || list.size() == 0;
    }

    public static <T> boolean isNotEmpty(final List<T> list) {
        return !isEmpty(list);
    }

    public static <T> boolean isEmpty(final Set<T> set) {
        return set == null || set.size() == 0;
    }

    public static <T> boolean isNotEmpty(final Set<T> set) {
        return !isEmpty(set);
    }

    public static <K, V> boolean isEmpty(final Map<K, V> map) {
        return map == null || map.size() == 0;
    }

    public static <K, V> boolean isNotEmpty(final Map<K, V> map) {
        return !isEmpty(map);
    }

    public static boolean isEmpty(final String str) {
        return StringUtils.isEmpty(str);
    }

    public static boolean isNotEmpty(final String str) {
        return StringUtils.isNotEmpty(str);
    }

    public static boolean isEmpty(final String[] strings) {
        return StringUtils.isEmpty(strings);
    }

    public static boolean isNotEmpty(final String[] strings) {
        return StringUtils.isNotEmpty(strings);
    }
}